// 如果没有通过拦截器配置域名的话，可以在这里写上完整的URL(加上域名部分)
// ****************************// 此处第二个参数vm，就是我们在页面使用的this，你可以通过vm获取vuex等操作**************************
//获取appid
let dingtalklogin = '/dingtalk/site/login'
let reportprojectindex = '/dingtalk/report/project-index'
let reportprojectprojectlist = '/dingtalk/report/report/project-list'
let reportreportreportmember = '/dingtalk/report/report/report-member'
let reportreportreportchannel = '/dingtalk/report/report/report-channel'
let reportcallbackdetail = '/dingtalk/report/callback-detail'
// ***********************************************************
const install = (Vue, vm) => {
	/*****将各个定义的接口名称，统一放进对象挂载到vm.$u.api(因为vm就是this，也即this.$u.api)下*************/
	//获取appid
	let dingtalk_login = (params = {}) => vm.$u.post(dingtalklogin, params)
	let report_project_index = (params = {}) => vm.$u.get(reportprojectindex, params)
	let report_project_project_list = (params = {}) => vm.$u.get(reportprojectprojectlist, params)
	let report_report_report_member = (params = {}) => vm.$u.get(reportreportreportmember, params)
	let report_report_report_channel = (params = {}) => vm.$u.get(reportreportreportchannel, params)
	let report_callback_detail = (params = {}) => vm.$u.get(reportcallbackdetail, params)
	// 同一挂载
	vm.$u.api = {
		dingtalk_login,
		report_project_index,
		report_project_project_list,
		report_report_report_member,
		report_report_report_channel,
		report_callback_detail
	};
}

export default {
	install
}
